﻿namespace CRM.Business.Services
{
    using System.Collections.Generic;
    using CRM.DataAccess.DAOs;
    using CRM.DataAccess.Entities;

    public static class EmailTemplateService
    {
        /// Gets or sets the role DAO.
        private static EmailTemplateDAO EmailTemplateDAO = new EmailTemplateDAO();

        //Get EMAIL_TEMPLATE by condition
        public static EMAIL_TEMPLATE GetEmailTemplateByID(long ID)
        {
            return EmailTemplateDAO.GetEmailTemplateByID(ID);
        }
        //Get EMAIL_TEMPLATE by condition
        public static List<EMAIL_TEMPLATE> GetEmailTemplateByCondition(string templateName, string subject, string description)
        {
            return EmailTemplateDAO.GetEmailTemplateByCondition(templateName, subject, description);
        }
       //Get All EMAIL_TEMPLATE
        public static List<EMAIL_TEMPLATE> ListAll()
        {
            return EmailTemplateDAO.ListAll();
        }
         //Add new EMAIL_TEMPLATE
        public static int addNewEmailTemplate(EMAIL_TEMPLATE email)
        {
            return EmailTemplateDAO.addNewEmailTemplate(email);
        }
        //Update Email Template
        public static int UpdateEmailTemplate(EMAIL_TEMPLATE email)
        {
            return EmailTemplateDAO.UpdateEmailTemplate(email);
        }
        //Delete Email template
        public static int DeleteEmailTemplate(long emailID)
        {
            return EmailTemplateDAO.DeleteEmailTemplate(emailID);
        }
    }
}
